<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditIdeaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditIdeaLabel_idIdea}" for="idIdea" />
                    <h:inputText id="idIdea" value="#{ideaController.selected.idIdea}" title="#{bundle.EditIdeaTitle_idIdea}" required="true" requiredMessage="#{bundle.EditIdeaRequiredMessage_idIdea}"/>
                    <h:outputLabel value="#{bundle.EditIdeaLabel_titulo}" for="titulo" />
                    <h:inputText id="titulo" value="#{ideaController.selected.titulo}" title="#{bundle.EditIdeaTitle_titulo}" required="true" requiredMessage="#{bundle.EditIdeaRequiredMessage_titulo}"/>
                    <h:outputLabel value="#{bundle.EditIdeaLabel_descripcion}" for="descripcion" />
                    <h:inputText id="descripcion" value="#{ideaController.selected.descripcion}" title="#{bundle.EditIdeaTitle_descripcion}" />
                    <h:outputLabel value="#{bundle.EditIdeaLabel_palabrasClave}" for="palabrasClave" />
                    <h:inputText id="palabrasClave" value="#{ideaController.selected.palabrasClave}" title="#{bundle.EditIdeaTitle_palabrasClave}" />
                    <h:outputLabel value="#{bundle.EditIdeaLabel_justificacion}" for="justificacion" />
                    <h:inputText id="justificacion" value="#{ideaController.selected.justificacion}" title="#{bundle.EditIdeaTitle_justificacion}" />
                    <h:outputLabel value="#{bundle.EditIdeaLabel_problema}" for="problema" />
                    <h:inputText id="problema" value="#{ideaController.selected.problema}" title="#{bundle.EditIdeaTitle_problema}" />
                    <h:outputLabel value="#{bundle.EditIdeaLabel_antecedente}" for="antecedente" />
                    <h:inputText id="antecedente" value="#{ideaController.selected.antecedente}" title="#{bundle.EditIdeaTitle_antecedente}" />
                    <h:outputLabel value="#{bundle.EditIdeaLabel_metodologia}" for="metodologia" />
                    <h:inputText id="metodologia" value="#{ideaController.selected.metodologia}" title="#{bundle.EditIdeaTitle_metodologia}" />
                    <h:outputLabel value="#{bundle.EditIdeaLabel_resultado}" for="resultado" />
                    <h:inputText id="resultado" value="#{ideaController.selected.resultado}" title="#{bundle.EditIdeaTitle_resultado}" />
                    <h:outputLabel value="#{bundle.EditIdeaLabel_objetivoGeneral}" for="objetivoGeneral" />
                    <h:inputText id="objetivoGeneral" value="#{ideaController.selected.objetivoGeneral}" title="#{bundle.EditIdeaTitle_objetivoGeneral}" />
                    <h:outputLabel value="#{bundle.EditIdeaLabel_version}" for="version" />
                    <h:inputText id="version" value="#{ideaController.selected.version}" title="#{bundle.EditIdeaTitle_version}" />
                    <h:outputLabel value="#{bundle.EditIdeaLabel_subdireccion}" for="subdireccion" />
                    <h:selectOneMenu id="subdireccion" value="#{ideaController.selected.subdireccion}" title="#{bundle.EditIdeaTitle_subdireccion}" >
                        <f:selectItems value="#{subdireccionController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditIdeaLabel_entidad}" for="entidad" />
                    <h:selectOneMenu id="entidad" value="#{ideaController.selected.entidad}" title="#{bundle.EditIdeaTitle_entidad}" >
                        <f:selectItems value="#{entidadController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditIdeaLabel_objetivoespecifico}" for="objetivoespecifico" />
                    <h:selectOneMenu id="objetivoespecifico" value="#{ideaController.selected.objetivoespecifico}" title="#{bundle.EditIdeaTitle_objetivoespecifico}" >
                        <f:selectItems value="#{objetivoespecificoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditIdeaLabel_tipoproyecto}" for="tipoproyecto" />
                    <h:selectOneMenu id="tipoproyecto" value="#{ideaController.selected.tipoproyecto}" title="#{bundle.EditIdeaTitle_tipoproyecto}" >
                        <f:selectItems value="#{tipoproyectoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditIdeaLabel_investigador}" for="investigador" />
                    <h:selectOneMenu id="investigador" value="#{ideaController.selected.investigador}" title="#{bundle.EditIdeaTitle_investigador}" >
                        <f:selectItems value="#{investigadorController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditIdeaLabel_areainvestigacion}" for="areainvestigacion" />
                    <h:selectOneMenu id="areainvestigacion" value="#{ideaController.selected.areainvestigacion}" title="#{bundle.EditIdeaTitle_areainvestigacion}" >
                        <f:selectItems value="#{areainvestigacionController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{ideaController.update}" value="#{bundle.EditIdeaSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditIdeaViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{ideaController.prepareList}" value="#{bundle.EditIdeaShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditIdeaIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
